Database Properties
Honeystore consists of databases. A database is a collection of historical values for items. A database has a set of properties. New databases can be created when Honeystore is running. Database can also be deleted when Honeystore is running.
Database Properties
The Honeystore database has the following properties:
Name | Description | Changeability |
---|---|---|
FileVersion | The file version of the meta-storage | Read-only |
Name | Name of the database | Read-write |
CachePath | The path of the location where the cache-file will be placed | Read-write |
DataDirPath | The path of the location on disk where all the historical files are stored | Read-write |
ConfigFile | The full path and name to the configuration file of the database | Read-write |
RunningMode | The running mode of the database, see Running Modes for description of the various modes. | Read-write |
EventSuppression | A property deciding which events that will be suppressed from the event-log reporting mechanism. | Read-write |
MaxItems | The currently maximum item-count of the database | Read-write |
UsedItems | The currently used item-count in the database | Read-only |
CacheSize | The size (in bytes) of the internal caches of the database, See also this. | Read-write |
MaxTrendFileSize | The maximum size (in bytes) an active trend-file may have. No retroactive effect if changed. | Read-write |
MaxDataBlockSize | The maximum size (in bytes) a single contiguous data-block may have. Used when importing and logging data. No retroactive effect if changed. | Read-write |
CreationDate | The date when the database was created | Read-only |
ModifiedDate | The date any of the properties of the database were modified | Read-only |
DBHandle | The current handle of the database | Read-only |
CompressionState | The compression state of the database | Read-write |
TimestampPrecision | The precision of the time-stamps, applies only for Eventbased with quality data samples | Read-write |
Capabilities | The capabilities of a Honeystore database; to allow or deny inserts of out-of-sequence (OOS) data in Online mode. Note! When allowing inserts of out-of-sequence data in Online mode, the inserts are handled asynchronously. That means that if you read back history immediately after an Insert call, you are not guaranteed to read back the OOS data you just inserted. OOS data inserts are put into a queue, and will be Inserted into history without interfering with the real-time capabilities of the database. | Read-write |
AvgCacheFlushTime | The average time in milliseconds used when flushing a cache into its corresponding trend file. Only applies when RunningMode is Online no write-cache. | Read-only |
MaxCacheFlushTime | The maximum time in milliseconds used when flushing a cache into its corresponding trend file. Only applies when RunningMode is Online no write-cache. | Read-only |
NumLostCaches | The number of lost caches due to performance issues. If this value is other than 0, it indicates data loss caused by performance issues. Only applies when RunningMode is Online no write-cache. | Read-only |
NumCacheFlushes | The number of caching flush iterations. Ie. the number of individua item caches that have been flushed since database was loaded. Only applies when RunningMode is Online no write-cache. |
Most of the properties can be changed directly, marked as read-write. The properties marked as read-only are changed indirectly (like the number of used items, which varies when items are added or removed from the database), or simply display some information and are not applicable for changing (like cache flush time properties).
Compression State
The data of a HoneyStore database, typically is compressed. Several compression types are offered.
The various compression states of a database, are:
Name | Description |
Uncompressed | No compression, raw data stored as is. |
Legacy_Fast | Lossless, old maximum compression. Fast. |
Legacy_Max | Lossless, old maximum compression. Very slow, but offers the highest compression ratio. |
LZ4_2 | Lossless LZ4 compression, acceleration level 2 (default). Best compromise of speed /compression ratio. |
LZ4_8 | Lossless LZ4 compression, acceleration level 8. Slightly better speed, lower compression ratio, than LZ4_2. |
LZ4_56 | Lossless LZ4 compression, acceleration level 56. Even better speed, and lower compression ratio, than LZ4_8. |
LZ4 compression disclaimer
LZ4 Library
Copyright (c) 2011-2016, Yann Collet
All rights reserved.
www.lz4.org
Database meta data storage
HoneyStore may store its meta data in several ways:
Windows registry and storage file.
In the windows registry, there will be a key for each database, to tell where the actual configuration file of the database is located. Using MYDB as an example, this registry would be:
HKEY_LOCAL_MACHINE\SOFTWARE\Prediktor\Apis\ApisHoneyStore\Databases
Underneath this registry key, there will be one string value named ConfigFile, whose value will be the full path and filename of the configuration file of that database.
For our example dayabase, when using the ApisNativeStorage file format):
ConfigFile = ApisDIR\Config\ApisHoneystore\MYDB.ansb
or (if using older ApisStructuredStorage file format):
ConfigFile = ApisDIR\Config\ApisHoneystore\MYDB.acdb
where ApisDIR typically is: C:\\program files\apis\config
Historical data files
The historical data files of the database are located at:
DATADIR\MYDB.dat*
where DATADIR is the DataDirPath property of the database.